#!bin/bash

if [ -z $BACKEND_HOST ];then
	echo "backend_host is null"
else
  envsubst '$BACKEND_HOST' < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf
fi

nginx -g 'daemon off;'
